#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
//#include "config.h"
#include "ffs.h"
#include "cod.h"
#include "evpath.h"
#include "ev_dfg.h"
#include "util.h"

static EVdfg test_dfg;

int generate_record() {
  return 16;
}

int main(int argc, char*argv[]) {
    
    CManager cm;
    cm = CManager_create();
    {
    static cod_extern_entry externs[] =
        { {"generate_record", (void *) (long) generate_record},
          {NULL, NULL}
        };
    //static char extern_string[] = "int generate_record(int a);\0\0";
    static char extern_string[] = "int generate_record();\0\0";
    EVadd_standard_routines(cm, extern_string, externs);
    }

    test_dfg = EVdfg_create(cm);
    EVdfg_join_dfg(test_dfg, "client1", argv[1]);
    EVdfg_ready_wait(test_dfg);
    CMrun_network(cm);
}
